package com.cyh.listener;

import org.springframework.context.ApplicationContext;

import javax.servlet.ServletContext;

public class WebApplicationContextUtil {
    public static ApplicationContext getWebApplicationContext(ServletContext servletContext) {
        return (ApplicationContext) servletContext.getAttribute("app");
    }

    public static void setWebApplicationContext(ServletContext servletContext, ApplicationContext app) {
        servletContext.setAttribute("app", app);
    }
}
